'use strict';

const { Controller } = require('egg');

class UserController extends Controller {
  // 模拟登陆
  async login() {
    await this.ctx.success({
      id: 101,
      username: '陈浩南',
      email: '123456@qq.com',
      avatar: 'http://xxx.com/1.jpg',
      token: 'xxxxaaabbbccc',
    });
  }
  // 模拟注册
  async register() {
    await this.ctx.success({
      id: 101,
      username: '陈浩南',
      email: '123456@qq.com',
      avatar: 'http://xxx.com/1.jpg',
      token: 'xxxxaaabbbccc',
    });
  }
}

module.exports = UserController;
